package com.ymm.web.controller;

import com.ymm.driver.api.constants.Entity.DriverEntity;
import com.ymm.driver.api.facade.DriverPersonalAllInformationService;
import com.ymm.driver.api.utils.Result;
import com.ymm.platform.api.constants.dto.DriverShowDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.math.BigInteger;

/**
 * @Company: CUG
 * @Description: TODO
 * @Author: LiYangyong
 * @Date: 2022/8/1/001 23:07
 **/
@Slf4j
@RestController
@RequestMapping("/driver")
public class TestController {

    @Reference(version = "server")
    DriverPersonalAllInformationService driverInformationService;


    @RequestMapping("/getMsg")
    public String getMsg(String str, Integer id, HttpServletRequest request) {

        Result<DriverEntity> driverEntityResult = driverInformationService.driverSearchInfo(BigInteger.valueOf(1L));
        System.out.println(driverEntityResult);

        return "hello";
    }

    @PostMapping(value = "/testRequestBody")
    public DriverShowDTO testRequestBody(DriverShowDTO dto) {

        return dto;
    }


}
